package org.ttitfly.ttcore.web.account;

import java.util.List;

import javax.annotation.Resource;

import org.ttitfly.ttcore.entity.account.User;
import org.ttitfly.ttcore.service.account.UserManager;
import org.ttitfly.ttcore.so.account.UserSO;
import org.ttitfly.ttcore.util.query.PageList;

public class UserPageList extends PageList<UserSO>  {

	@Resource
	private UserManager userManager;
	
	public UserPageList(UserSO so, UserManager userManager) {
	      super(so);
	      this.userManager = userManager;
	}

	@Override
    protected int getObjectCount() {
        return userManager.getSOUserViewCount(so);
    }

    @Override
    protected List<User> getObjectList() {
        return userManager.getSOUserView(so);
    }

	public UserManager getUserManager() {
		return userManager;
	}

	public void setUserManager(UserManager userManager) {
		this.userManager = userManager;
	}
    
	
}
